package com.douxg.fastCoding.spring.exception;

import com.douxg.fastCoding.spring.consts.BizCode;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @Description 自定义非检查异常
 * @Auther douxg
 * @Date 2020/4/16 14:12
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class BizRuntimeException extends RuntimeException {
    private BizCode bizCode;

    public BizRuntimeException(BizCode bizCode, Throwable throwable) {
        super(throwable);
        this.bizCode = bizCode;
    }
}
